Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Creating "manual" check range Post Reply Post New Topic
Author Message
c4uldr0n
Newbie
Newbie


Joined: 27 Sep 2007
Location: United States
Online Status: Offline
Posts: 4
Quote c4uldr0n Replybullet Topic: Creating "manual" check range
    Posted: 27 Sep 2007 at 9:00am
Hello,

I am rather new to Crystal Reports but am avidly working hard on programming and formatting reports together for work due to a software change over. I created employee checks based off our SQL database but the application doesn't allow you to create blank checks in a range of check X to check Y. Since I don't have easy views to select to do my grouping I was wondering how I can do it with formulas and parameters... example:

Global NumberVar CheckStartNumber := {?CheckStartNumber};
Global NumberVar CheckEndNumber := {?CheckEndNumber};

while CheckStartNumber <= CheckEndNumber do
(
CheckStartNumber;
CheckStartNumber := CheckStartNumber +1;
)

.... something similar anyway...

The problem I run into is that my document is one page and I want to be able to span to multiple pages based on how many checks there are... Please help, I'm on IM or we can discuss in the forum.

c4uldr0n / Korri



Edited by c4uldr0n - 27 Sep 2007 at 9:00am
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 27 Sep 2007 at 11:24am
Well, I'm a little confused (and too many deadlines today to really study all the questions posted to the forum). I think you are saying that you want to print checks where data doesn't exist yet? Thus, you want to dynamically print blank checks from 100x to 1xxx?

Unfortunately, CR only works with existing data. Creating new data from scratch or using loops to bulid dynamic data isn't it's strong point. Ideally, you would have be able to write a .NET program which creates a dataset in memory and pass that to CR. But I doubt if that what you were thinking of. I'm wondering if you have access to the database where you can create a stored procedure? If so, you can write a similar loop in SQL to build a temporary table in memory and add the records to it before passing them to CR. You can pass the parameters to the stored procedure and it can run the loop to build the data. If you know how to do stored procedures, then this is your best bet. If you have to stick with CR, then I don't know how to handle it. I'm not sure CR can.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 27 Sep 2007 at 11:26am
Hmmm.... I may have read this wrong and that was a really useless post I just wrote. Now I think you have existing data and you just want to print dynaimic check numbers on each record. If so, your formula should be working. If not, let us know what the actual problem is.

Re printing new checks on each page. Just create a dummy group footer and right-click on it so set the section properties. Then enable then 'New Page After' setting.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
c4uldr0n
Newbie
Newbie


Joined: 27 Sep 2007
Location: United States
Online Status: Offline
Posts: 4
Quote c4uldr0n Replybullet Posted: 27 Sep 2007 at 11:33am
I forgot to mention I have CR XI... just in case this is or isn't a problem. I'm not sure where to insert that formula, and when I create the formula and insert it into the report is gives me a boolean expression. :(
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 27 Sep 2007 at 11:37am
So I assume that the data exists and you just want to create dynamic check numbers using the parameters? Let me know if this is a correct assumption and I'll post the steps for it.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
c4uldr0n
Newbie
Newbie


Joined: 27 Sep 2007
Location: United States
Online Status: Offline
Posts: 4
Quote c4uldr0n Replybullet Posted: 27 Sep 2007 at 12:11pm
The data I'm getting from my SQL database is pretty much the following, all in the same view:

Company #
Bank #
Routing #
Account #

My parameters are Company #, Bank #, Date, CheckStart and CheckEnd... so CheckStart and CheckEnd are not in the SQL database, and are designed as "layoff" checks. After all of the checks are hand written we then input the checks and back into our system. The check numbers don't exist prior so they are pretty much being "generated" for when we do layoffs.
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 27 Sep 2007 at 12:19pm
I gotcha now. That's bad new though. You need to go back to what I was saying about using a SQL stored procedure to build the data using a temporary table. CR can't do create the dynamic data on the fly like you need it to.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
c4uldr0n
Newbie
Newbie


Joined: 27 Sep 2007
Location: United States
Online Status: Offline
Posts: 4
Quote c4uldr0n Replybullet Posted: 27 Sep 2007 at 1:04pm
alright, stored procedure it is! :)
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.