Generating a report using a script through Adwords.
I get an "Invalid reporting query" error. I researched the my code extensively and I can't see what is wrong with my query. I found this article "https://groups.google.com/forum/#!topic/adwords-scripts/-b1diiebrAs" which I think is related but I call out the account ID's as a variable so confused.
function main() {
//////////////////////////////////////////////////////////////////////////////
// Options
var startDate = "2015-01-01";
var endDate = "2015-12-07";
var currencySymbol = "$";
var campaignNameContains = "";
var ids = "325-688-1878";
var spreadsheetUrl = "https://docs.google.com/spreadsheets/d/1flJAypUujfk-HzFRI9wfWoJB60h2N7cdV_i8t_dpDlI/edit#gid=0";
//////////////////////////////////////////////////////////////////////////////
// Thresholds
var impressionThreshold = 10;
var clickThreshold = 0;
var costThreshold = 0;
var conversionThreshold = 0;
// Words will be ignored if their statistics are lower than any of these thresholds
//////////////////////////////////////////////////////////////////////////////
// Find the negative keywords
var negativesByGroup = [];
var negativesByCampaign = [];
var sharedSetData = [];
var sharedSetNames = [];
var sharedSetCampaigns = [];
var dateRange = startDate.replace(/-/g, "") + "," + endDate.replace(/-/g, "");
var activeCampaignIds = [];
// Gather ad group level negative keywords
var keywordReport = AdWordsApp.report(
"SELECT CampaignId, AdGroupId, KeywordText, KeywordMatchType " +
"FROM KEYWORDS_PERFORMANCE_REPORT " +
"WHERE CampaignStatus = ENABLED AND AdGroupStatus = ENABLED AND Status = ENABLED AND IsNegative = TRUE " +
"AND CampaignName CONTAINS_IGNORE_CASE '" + campaignNameContains + "' " +
"AND campaignId CONTAINS_IGNORE_CASE '" + ids + "' " +
"DURING " + dateRange);