一次直接打印多个jasper报告

时间:2015-07-21 06:56:51

标签: java jasper-reports

我一直在尝试直接打印两个jasper报告,但它只打印一个报告,而另一个报告则发送错误说, net.sf.jasperreports.engine.JRException:java.io.FileNotFoundException:Reports \ Invoice.jasper

以下代码是我用于此操作的IReport连接代码。

IReport showme = new IReport("Reports/Invoice.jasper", param);
 IReport showme2 = new IReport("Reports/Bill.jasper", param,"text");

最后我在另一个班级中调用了这个

class User(models.Model): user_id = models.CharField(max_length=40,unique=True) user_name = models.CharField(max_length=40) user_email = models.EmailField() user_city = models.CharField(max_length=40) videos_watched = models.ManyToManyField('VideoData', through='WatchedVideo') class Meta: ordering = ['user_id'] verbose_name = 'User MetaData' verbose_name_plural = 'Users MetaData' def __unicode__(self): return self.user_id class VideoData(models.Model): video_id = models.CharField(max_length=40,unique=True) video_name = models.CharField(max_length=40) class Meta: verbose_name = 'User_Video MetaData' verbose_name_plural = 'Users_Video MetaData' def __unicode__(self): return self.video_id class WatchedVideo(models.Model): user = models.ForeignKey(User, to_field = 'user_id') videoData = models.ForeignKey(VideoData, to_field = 'video_id') time = models.PositiveIntegerField(null = True)

0 个答案:

没有答案