Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9069249
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T17:22:47+00:00 2026-06-16T17:22:47+00:00

I have a series of crystal reports that needs to be generated based on

  • 0

I have a series of crystal reports that needs to be generated based on a propertyID. These reports require 2 parameters (PropertyID and date). I use crystal reports exporter to convert these to pdf to be emailed out.

I need to create a batch file that runs this conversion for each specific property. I’ve created a txt file with isql containing a column of propertyIDs. I need to make a loop that will read the 1st row of my list of columns then iterate through the rest of the IDs.

This is my first time working with batch files so I’d appreciate any help I can get 🙂 Thanks!

UPDATE:
Been working on this some more. And Now I think I’m just having issues with my parameters. For now, I’m just going to start out with one parameter -PropertyID- until I can get a grasp on this. Here is my code as of now..
This is my batch file that runs the conversion of the reports to pdf:

c:
cd c:\y46\crexport #navigating to proper folder
crexport.exe -U username -P password -S server -D dbname -F "C:\y46\crexport\rs_Ardent_Owner_Stmtsputesting.rpt" -O "C:\y46\crexport\output.pdf" -E pdf -a "curr_month:11/01/2012 00:00:00" -a "pscode:%A"

As you can see, my two parameters are being defined here, but pscode(PropertyID) is being set to A (most likely because I’m failing to understand how parameters work). But here is my code I use to call my batch file:

FOR %A IN ("C:\y46\crexport\output.txt") DO "C:\y46\crexport\batch.bat" %A

This works but it’s not sending correct parameter values to the batch file so I don’t generate any output reports. Also not sure if this is going to loop correctly through each record once I iron out my parameter issues.

Here is another sample of text file source. Just a single column as you can see below. Each row is a propertyID. Some are 3 digits others are 8.

010     
057     
152     
197     
21210721  
21210722    
22090461  
22090462  
22090781  
22090782  
22093561  
22093562  
23180051  
23180052  
23220781  
23220782  
257     
324     
350     
352     
354     
355     
367     
400     
401     
402        
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T17:22:49+00:00Added an answer on June 16, 2026 at 5:22 pm

    You are almost there, just a few changes are needed

    cd C:\y46\crexport
    for /f %%a in (file.txt) do (
    crexport.exe -U username -P password -S server -D dbname -F "C:\y46\crexport\rs_Ardent_Owner_Stmtsputesting.rpt" -O "C:\y46\crexport\output.pdf" -E pdf -a "curr_month:11/01/2012 00:00:00" -a "pscode:%%a"
    )
    

    I have changed the %A on the end to %%a to match the for loop (presuming this is the name of the file currently being processed by the loop.

    In short this batch file will process all files in the directory C:\y46\crexport and for each of them run the crexport command that you specified in your question.

    If these aren’t the right parameter’s for crexport then let me know the details and I will tweak it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a series of images that I want to make use of in
I have a series of PHP page, and I would like to use conditional
I have a series of logging breakpoints in Xcode4 that I'm using to selectively
I have a series of divs that slide down using -webkit-transform from a negative
I have a series of images that get loaded for a carousel, and it
I have a series of grouped values that follow a specific format and would
I have series of mysql databases on my server. The names of these databases
I have series of curl commands that I want to translate into straight up
I have a series of chained selects that are populated dynamically by a call
I have a series of slides based off of sections: <div id=slides> <section id=first>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.